<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/3
 * Time: 15:26
 */
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\helpers\Fun;
use common\components\extenders\MenuManage;

use doumiaoduo\layer\LayerAsset;
LayerAsset::register($this);

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
?>
    <div class="yx-cnt-box yx-praise-content yx-radius2">
        <div class="yx-praise-box">
            <a href="<?=Fun::url(['artclassmanage/index'])?>" class="btn yx-back-list yx-radius5 ">返回上级列表</a>
            <div class="yx-member-info">
                <h3 class="yx-pb15">艺教学课程信息:</h3>
                <table class="yx-member-box yx-member-box1">
                    <tr>
                        <td bgcolor="#f8f8f8">课程名称</td>
                        <td><?=$art_details['name']?></td>
                        <td bgcolor="#f8f8f8">课程类型</td>
                        <td><?php switch ($art_details['type']){
                                case 1:
                                    echo '益智';
                                    break;
                                case 2:
                                    echo '音乐';
                                    break;
                                case 3:
                                    echo '形体';
                                    break;
                            }?></td>
                        <td bgcolor="#f8f8f8">价格</td>
                        <td><?=$art_details['price']?></td>
                    </tr>
                    <tr>
                        <td bgcolor="#f8f8f8">课次</td>
                        <td><?=$art_details['class_count']?>节课</td>
                        <td bgcolor="#f8f8f8">最大人数</td>
                        <td><?=$art_details['max_count']?>人</td>
                        <td bgcolor="#f8f8f8">上课日期</td>
                        <td><?=$art_details['class_time']?></td>
                    </tr>
                    <tr>
                        <td bgcolor="#f8f8f8">状态</td>
                        <td><?php
                            switch ($art_details['status']) {
                                case 0:
                                    echo '未开课';
                                    break;
                                case 1:
                                    echo '已开课';
                                    break;
                                case 2:
                                    echo '已结束';
                                    break;
                            }
                            ?></td>
                        <td bgcolor="#f8f8f8">开课时间</td>
                        <td><?= ($art_details['start_time'] == null) ? '未开课' : \Yii::$app->formatter->asDatetime($art_details['start_time']) ?></td>
                        <td bgcolor="#f8f8f8"></td>
                        <td></td>
                    </tr>
                </table>
            </div>

            <div class="yx-member-info">
                <h3 class="yx-pb15">课程详细信息:</h3>
                <table class="yx-member-box yx-member-box1" style="width: 100%">
                    <?php foreach ($class_details as $k=>$v) { ?>
                    <tr>
                        <td bgcolor="#f8f8f8">课程名称</td>
                        <td><?=$v['course'] ?></td>
                        <td bgcolor="#f8f8f8">老师姓名</td>
                        <td><?=$v['teacher']?></td>
                        <td bgcolor="#f8f8f8">教室</td>
                        <td><?=$v['classroom']?></td>
                    </tr>
                    <?php } ?>
                </table>
            </div>

            <div class="yx-member-info">
                <h3 class="yx-pb15">技教学信息:</h3>
                <table class="yx-member-box yx-member-box1" style="width: 100%">
                    <?php foreach ($skill_class as $k=>$v) { ?>
                        <tr>
                            <td bgcolor="#f8f8f8">课程名称</td>
                            <td><?=$v['name'] ?></td>
                            <td bgcolor="#f8f8f8">学生人数</td>
                            <td><?=$v['count']?>人</td>
                            <td bgcolor="#f8f8f8">状态</td>
                            <td><?=$v['status']?></td>
                        </tr>
                    <?php } ?>
                </table>
            </div>
        </div>
    </div>

<?php
$js = <<<JS
    
JS;
$this->registerJs($js);
?>